FROM centos:7
MAINTAINER xxx@qq.com

ADD daemon.json /etc/docker/daemon.json
ADD CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo
#安装相关依赖
RUN yum -y install net-tools java-1.8.0-openjdk java-1.8.0-openjdk-devel kde-l10n-Chinese
# 编译生成语言库
RUN localedef -c -f UTF-8 -i zh_CN zh_CN.utf8
# 设置语言默认值为中文，时区改为东八区
RUN echo 'LANG="zh_CN.UTF-8"' > /etc/locale.conf
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ENV LANG zh_CN.UTF-8
ENV LC_ALL zh_CN.UTF-8

WORKDIR /

# 暴露端口product环境
EXPOSE 8080

ADD target/example-bootstrap.jar ./

#测试环境
CMD java  -Djava.security.egd=file:/dev/./urandom  -Duser.timezone=GMT+8 -jar example-bootstrap.jar  --spring.profiles.active=product
